package com.j2eefast.flowable.bpm.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.j2eefast.common.core.mutidatasource.annotaion.DataSource;
import lombok.Data;

import java.util.Date;

/**
 * <p>待发流程定义</p>
 *
 * @author: figol
 * @date: 2021-05-17 14:44
 */
@Data
@TableName("bpm_form_draft")
public class BpmFormDraftEntity {

	/**
	 * 流程实例id
	 */
	@TableId(value = "id")
	private String id;
	/**
	 * 名称
	 */
	@TableField(value = "title")
	private String title;

	/**
	 * 标识
	 */
	@TableField(value = "url")
	private String url;

	/** 状态，0待发，1已发，保存为草稿后，可以重新发起流程 */
	@TableField(value = "status")
	private String status;

	/** 备注 */
	@TableField(value = "remark")
	private String remark;

	/** 所有者ID */
	@TableField(value = "user_id")
	private String userId;

	/** 表单数据ID */
	@TableField(value = "form_data_id")
	private String formDataId;

	/** 流程实例ID */
	@TableField(value = "process_instance_id")
	private String processInstanceId;

	/**  是否有效标识符，1有效，0无效（直接发送的表单也在该表中有记录active值为0，主要是为了方便读取流程的优先级） */
	@TableField(value = "active")
	private String active;

	/** 优先级 */
	@TableField(value = "priority")
	private String priority;

	@TableField(value = "create_by")
	private String createBy;

	@TableField(value = "update_by")
	private String updateBy;

	@TableField(value = "update_time")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
	private Date updateTime;

	@TableField(value = "create_time")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
	private Date createTime;

	private String tableType;
}
